package com.cloudkinto.service.company.vo;

import cn.hutool.core.date.DateUtil;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
public class ProductQueryResponse {
    private boolean success = false;

    private Integer errorCode;

    private String errorMsg;

    private Integer serverTime = Math.toIntExact(DateUtil.currentSeconds());

    Result result;

    @Data
    public static class Result {
        public Long totalCount;

        List<SkuInfo> skuInfoList;

        public Result(Long totalCount, List<SkuInfo> skuInfoList) {
            this.totalCount = totalCount;
            this.skuInfoList = skuInfoList;
        }

        public Result() {
        }

    }

    public ProductQueryResponse(Integer errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public ProductQueryResponse() {
    }
}
